﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CartControl.ascx.cs" Inherits="CartControl" %>

<style type="text/css">
    .style1
    {
        width: 61%;
    }
    .style2
    {
    }
    .style5
    {
        height: 17px;
    }
    .style13
    {
        width: 153px;
    }
    .style14
    {
        width: 189px;
    }
    .style15
    {
        width: 61%;
    }
    .style17
    {
        width: 216px;
    }
    .style18
    {
        width: 125px;
    }
</style>
<asp:Panel ID="pnCart" runat="server" Width="100%">
    <p>
    </p>
    <p>
        <asp:GridView ID="gridViewCart" runat="server" 
        AutoGenerateColumns="False" DataKeyNames="OrderID" 
        EnableModelValidation="True" PageSize="5" AutoGenerateEditButton="True" 
        onrowcancelingedit="gridViewCart_RowCancelingEdit" 
        onrowdeleting="gridViewCart_RowDeleting" onrowediting="gridViewCart_RowEditing" 
        onrowupdating="gridViewCart_RowUpdating">
            <Columns>
                <asp:TemplateField HeaderText="Order ID">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("OrderID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Details ID">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("OrderDetailsID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Image">
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImgUrl") %>' />
                    </ItemTemplate>
                    <ControlStyle Height="70px" Width="100px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Quantity">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtQuantityUpdate" runat="server" Width="25px" 
                        Text='<%# Eval("Quantity") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="txtQuantity" runat="server" Width="25px" 
                        Text='<%# Eval("Quantity") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Resolution">
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("RES") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Total Price">
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("TPrice") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <EmptyDataTemplate>
                Your Cart is empty...
                <asp:HyperLink ID="hyAlbum" runat="server" NavigateUrl="~/ViewAlbum.aspx">Click here</asp:HyperLink>
                &nbsp;to add Cart
            </EmptyDataTemplate>
        </asp:GridView>
    </p>
    <p>
        Total Price:
        <asp:Label ID="lblStatus" runat="server"></asp:Label>
    </p>
    <p>
        <asp:Button ID="btnAddMoreImage" runat="server" onclick="btnAddMoreImage_Click" 
        Text="Add More Image" ValidationGroup="AddMore" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnCheckOut" runat="server" onclick="btnCheckOut_Click" 
        Text="Check Out" ValidationGroup="CheckOut" />
    </p>
</asp:Panel>
<asp:Panel ID="pnCheckOut" runat="server" Height="284px" Visible="False" 
    Width="100%">
    <table align="center">
        <tr>
            <td align="center"  colspan="3">
                <h3>
                    Sender Information</h3>
            </td>
        </tr>
        <tr>
            <td class="style14">
                Full Name</td>
            <td class="style13">
                <asp:Label ID="lblFullNameSend" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                Address</td>
            <td class="style13">
                <asp:Label ID="lblAddressSend" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                Email</td>
            <td class="style13">
                <asp:Label ID="lblEmailSend" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                Phone Number</td>
            <td class="style13">
                <asp:Label ID="lblPhoneSend" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                &nbsp;</td>
            <td class="style13">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="style5" colspan="3">
                <h3>
                    Receiver Infomation</h3>
            </td>
        </tr>
        <tr>
            <td class="style14">
                Address</td>
            <td class="style13">
                <asp:TextBox ID="txtAddressRecevier" runat="server" Width="150px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtAddressRecevier" ErrorMessage="Address cannot let blank" 
                    ValidationGroup="OK"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style14">
                Payment</td>
            <td class="style13">
                <asp:DropDownList ID="dropDownPayment" runat="server" Width="150px">
                    <asp:ListItem>Online</asp:ListItem>
                    <asp:ListItem>Direct</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                &nbsp;</td>
            <td class="style13">
                <asp:Label ID="lblStatusOrder1" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style14">
                &nbsp;</td>
            <td class="style13">
                <asp:Button ID="btnOK" runat="server" onclick="btnOK_Click" Text="Ok" 
                    ValidationGroup="OK" />
                <asp:Button ID="btnCancel" runat="server" CausesValidation="False" 
                    onclick="Button2_Click" style="margin-left: 47px" Text="Cancel" 
                    ValidationGroup="Cancel" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Panel>
<p>
    &nbsp;</p>
<asp:Panel ID="pnPaymentOnline" runat="server" Visible="False" Width="100%">
    <table class="style15" align="center">
        <tr>
            <td colspan="2">
                <h3 align="center">
                    Payment Online</h3>
            </td>
        </tr>
        <tr>
            <td class="style18">
                Your Money:</td>
            <td>
                <asp:Label ID="lblYourMoney" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style18">
                Payment Money:</td>
            <td>
                <asp:Label ID="lblPaymentMoney" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style18">
                &nbsp;</td>
            <td>
                <asp:Label ID="lblStatusOrder2" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style18">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnOkPayment" runat="server" onclick="btnOkPayment_Click" 
                    Text="OK" ValidationGroup="OKPayment" Width="47px" />
                <asp:Button ID="btnCancelPayment" runat="server" 
                    onclick="btnCancelPayment_Click" style="margin-left: 16px" Text="Cancel" 
                    ValidationGroup="CancelPayment" />
            </td>
        </tr>
    </table>
</asp:Panel>







